#ifndef _FIGURECONTAINER_H_
#define _FIGURECONTAINER_H_


#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


#include "Error.h"
#include <map>
#include <string>
#include "..\Figure\Figure.h"
#include "..\Exceptions\IdAlreadyExistsException.h"

class Figure;

class FigureContainer {
	
	public:
	
		virtual ~FigureContainer();

		static FigureContainer* getInstance();

		Figure* getFigureById(std::string figureId);

		void addFigure(Figure* figure)throw (IdAlreadyExistsException);

		const std::map<std::string, Figure*> getAllFigures() const;

		static void destroy();
		
	private:

		FigureContainer();
	
		static FigureContainer* instance;

		static std::map<std::string,Figure*> figures;

};

#endif
